package com.pace.ribbon.event;

import org.springframework.context.ApplicationListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * 下单事件监听器
 *
 * @author forest
 *
 */
@Component
@Async
public class OrderCreateEventListener implements ApplicationListener<OrderCreateEvent> {

    @Override
    public void onApplicationEvent(OrderCreateEvent orderCreateEvent) {
        // 对下单操作进行处理
        System.out.println("打印订单");
        System.out.println(orderCreateEvent.getOrderSn());
    }

}
